package com.structure.tree;

/**
 * @Author Tanyu
 * @Date 2020/5/22 15:15
 * @Description
 * @Version 1.0
 */
public class TreeNode {
  int val;
  TreeNode left;
  TreeNode right;

  TreeNode(int x){
    val=x;
  }

  public void setLeft(TreeNode left) {
    this.left = left;
  }
  public void setRight(TreeNode right) {
    this.right = right;
  }

  public int getVal() {
    return val;
  }

  public void setVal(int val) {
    this.val = val;
  }

  public TreeNode getLeft() {
    return left;
  }

  public TreeNode getRight() {
    return right;
  }
}
